//
//  UILabel+Addition.m
//  investevent
//
//  Created by jiangshao on 16/3/9.
//  Copyright © 2016年 com.scj.investevent. All rights reserved.
//

#import "UILabel+Addition.h"

@implementation UILabel (Addition)


/**
 计算高度
 */
-(void)resizeHeight{
    if ([self.text isEqualToString:@""]) {
        return;
    }
    
    NSString *strUrl=self.text;
    self.numberOfLines=0;
//    [self setLineBreakMode:NSLineBreakByTruncatingTail];
//    NSMutableAttributedString * attributedString1 = [[NSMutableAttributedString alloc] initWithString:strUrl];
//    NSMutableParagraphStyle * paragraphStyle1 = [[NSMutableParagraphStyle alloc] init];
//    [paragraphStyle1 setLineSpacing:0];
//    paragraphStyle1.paragraphSpacingBefore = 5;
//
//    [attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle1 range:NSMakeRange(0, strUrl.length)];
//    [self setAttributedText:attributedString1];
    [self sizeToFit];
}


@end
